package game.views;

import game.data.XlsData;
import hx.display.Box;

/**
 * 地图图标选项组件
 */
@:build(hx.macro.UIBuilder.build("assets/views/MapIconItem.xml"))
class MapIconItem extends Box {
	public function setData(data:Dynamic):Void {
        var tData = XlsData.maps.ofType(data.data);
		this.icon.data = "assets/icons/maps/" + tData.mapid + ".png";
	}

    public function setSelected(selected:Bool):Void {
        this.selected.visible = selected;
    }
}
